import {request} from "@/api";
import type {SysBizException} from "@/api/biz-exception/types.ts";
import type {Page} from "@/api/types.ts";

const apiPrefix = "/varian-system/biz-exception"
export const bizExceptionApi = {
    page: (params: any) => request.get<Page<SysBizException>>(`${apiPrefix}/page`, {params}),
    detail: (id: string) => request.get<SysBizException>(`${apiPrefix}/${id}`),
    add: (data: SysBizException) => request.post(`${apiPrefix}`, {data}),
    modify: (data: SysBizException) => request.put(`${apiPrefix}/${data.id}`, {data}),
    delete: (id: string) => request.delete(`${apiPrefix}/${id}`)
}
